Repository navigation
Keep pretty-printer character variable local - #22
Open
dajiaohuang wants to merge 2 commits into
Open
dajiaohuang wants to merge 2 commits into
dajiaohuang wants to merge 2 commits into
Conversation
andremm
reviewed
Nov 5, 2026
| @@ -1,3 +1,5 @@ | |||
| dofile("test-pp.lua") | |||
Owner
There was a problem hiding this comment.
You probably want to move this to the end of the file. Perhaps before the last OK print and maybe add a print saying you are testing the pretty printer.
Owner
There was a problem hiding this comment.
Another option is to add the pretty printer test code at the end of this test file.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Calling the documented
pp.tostringAPI on an AST containing a string assigns each byte to the globalchar, overwriting a caller's existing value or creating a new global.Make the loop variable local. The standalone pretty-printer regression checks existing and absent global values; as requested in review,
test.luanow runs it near the end, announces the section, and keeps its shebang first.Validation: the earlier revision's isolated embedded Lua 5.1, 5.3 and 5.4 regression passed. For the current revision,
git diff --checkpassed; native Lua and LPegLabel are unavailable here, so the full suite and runtime matrix remain unverified.